home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-01-20 | 1.1 KB | 55 lines | [TEXT/EDIT] |
- #Options +B +E -G -H +J +K +Z
- #asm
- .verbose
- #endasm
- #include "MyTools.p"
- #include "MS.h"
- //============================
- MSParsePROC(theMSP,flg,resTab)
- MSPtr theMSP;
- short flg,*resTab;
- //=========================
- BEGIN_FCT
- int i;
- short allocCount,byteOffSet,
- *paramPtr,paramCtr,upper,lower;
-
- if (NOT BitTst(theMSP->MVT, _MFPRCPAR))
- return(FALSE);
- allocCount=theMSP->allocCount;
- byteOffSet=_MSFIXLEN+(allocCount+1)*sizeof(MenuVerb);
- paramPtr=(short *)((char *)theMSP+byteOffSet);
- paramCtr=*paramPtr;
- if (paramCtr LT (2*(flg+1)))
- return(FALSE);
- paramPtr+=2*flg+1;
- FOR (i=0;i LE 1;i++)
- paramPtr+=i;
- upper=*paramPtr BAND 0xFF00;
- lower=*paramPtr BAND 0x00FF;
-
- IF (upper)
- THEN
- if (BitTst(&lower,16))
- lower = lower BOR 0xFF00;
- SWIT (upper)
- CASE (_MSMIVTST)
- *(resTab+i)=(theMSP->staticCount)+lower;
- ENDCASE
-
- CASE (_MSMIVTAL)
- *(resTab+i)=allocCount+lower;
- ENDCASE
- CASE (_MSMIVTDY)
- DEFCASE
- *(resTab+i)=CountMItems(theMSP->MH)+lower;
- ENDCASE
- ENDSWIT
- ELSE
- *(resTab+i)=lower;
- ENDIF
- ENDFOR
- return (TRUE);
-
- END_FCT
-